Field of the Invention
The present invention relates to a communication apparatus, a communication method, and a non-transitory computer-readable storage medium.
Description of the Related Art
As a wireless connection method between a communication apparatus and a communication partner apparatus in a wireless communication system, other than wireless connection methods that are via an access point (for example an infrastructure mode), a peer-to-peer (P2P) wireless connection method is known. In the P2P wireless connection method, the communication apparatus directly performs a wireless connection with the communication partner apparatus by the communication apparatus or a communication partner operating as an access point.
As a specification for realizing such a P2P wireless connection method, for example Wi-Fi Direct (registered trademark) is known. A communication apparatus that supports Wi-Fi Direct can operate as an access point (a group owner), and a wireless connection with a communication partner apparatus that operates as a client can be made directly. At that time, which of the communication apparatus and the communication partner apparatus operates as the access point is decided by Group Owner Negotiation. By this, a conventional device that is a dedicated access point becomes unnecessary, and a direct connection between apparatuses is realized.
Japanese Patent Laid-Open No. 2014-131145 discloses a method in which, when a communication apparatus that supports Wi-Fi Direct tries to connect to another communication apparatus, a user of the communication apparatus selects a desired connection destination (an existing network or a new network).
However, after the communication apparatus operates as a client to connect to the communication partner apparatus that operates as the access point, if the connection is disconnected then the communication apparatus cannot be detected from the other apparatus, and also cannot reconnect. In other words, the communication apparatus enters a state in which it is without exception close to having stopped as a Wi-Fi Direct device, and this leads to a decrease of usability as a result.